package JAVA_LianXi_50;

public class program_20 {
	public static void main(String[] args) {
		double a=1;double b=2;
		double c;double sum=0;
		double temp;
		
		for (int i=0;i<2;i++) {
			temp=b;
			c=b/a;
			b=b+a;
			a=temp;
			sum+=c;
		}
		System.out.println(sum);
	}
}
